<script setup>
import {useStore} from "@/store";
import {getForumTypes} from "@/api/forum";

const store = useStore()
getForumTypes(data => {
    const array = []
    array.push({id: 0, name: '全部', color: '#3f3f3f3f'})
    data.forEach(d => array.push(d))
    store.forum.types = array
})
</script>

<template>
    <div>
        <router-view v-slot="{ Component }">
            <transition name="el-fade-in" mode="out-in">
                <keep-alive include="TopicList">
                    <component :is="Component" style="height: 100%"/>
                </keep-alive>
            </transition>
        </router-view>
        <el-backtop target=".main-content-page .el-scrollbar__wrap" :right="20" :bottom="70"/>
    </div>
</template>

<style scoped>

</style>